home *** CD-ROM | disk | FTP | other *** search
Wrap
ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE cl_impactcomp - IMPACT Compression JPEG Accelerator (in the Compression Library) SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll....hhhh>>>> ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp....hhhh>>>> DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN IMPACT Compression is an optional hardware accelerator for JPEG image compression. The programming interface to impactcomp is via the standard Compression Library. For overviews of the JPEG standard and the CL API, see _j_p_e_g(4) and _C_L_i_n_t_r_o(3dm). Impactcomp implements a subset of the JPEG standard optimized for video originated images. This subset is baseline JPEG, interleaved YCrCb, 8- bits per component. Impactcomp is capable of compressing and decompressing to and from memory, or to and from the video hardware present on impactcomp or an IMPACT Video option. Impactcomp also supports an arbitrary scale down and clip of images being decompressed to memory. This scaling happens without any performance penalty and produces high quality results. PPPPRRRROOOOGGGGRRRRAAAAMMMMMMMMIIIINNNNGGGG IIIIMMMMPPPPAAAACCCCTTTT CCCCOOOOMMMMPPPPRRRREEEESSSSSSSSIIIIOOOONNNN IMPACT Compression is programmed via the Compression Library (CL) utilizing the base CL API as well as JPEG-specific and impactcomp- specific parameters. UUUUSSSSIIIINNNNGGGG IIIIMMMMPPPPAAAACCCCTTTTCCCCOOOOMMMMPPPP The IMPACT Compression JPEG Codec is invoked by first querying the compression library for the scheme named "impact" using ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmNNNNaaaammmmeeee.... The application then specifies this scheme argument to ccccllllOOOOppppeeeennnnCCCCoooommmmpppprrrreeeessssssssoooorrrr.... At most two applications can have impactcomp open at a time. An error will be returned if both channels are busy. SSSSEEEETTTTTTTTIIIINNNNGGGG UUUUPPPP TTTTRRRRAAAANNNNSSSSFFFFEEEERRRRSSSS Impactcomp is capable of four different modes of operation. Video can be compressed to a memory buffer, a memory buffer can be decompressed and sent out to video, an image in memory can be compressed to memory, and a compressed image can be decompressed to memory. Video data is always treated as non-interleaved fields. Memory to memory transfers may be initiated using the standard CL calls. The size of the uncompressed image must not be larger than 4080 pixels wide by 4088 lines high. The uncompressed data format must be either CL_FORMAT_YCbCr422 or CL_FORMAT_XBGR. PPPPaaaaggggeeee 1111 ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) Transfers to and from video must use the CL direct buffered interface specifying CL_EXTERNAL_DEVICE as the _f_r_a_m_e_B_u_f_f_e_r parameter to ccccllllCCCCoooommmmpppprrrreeeessssssss or ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssss. Additionally, the call to ccccllllDDDDeeeeccccoooommmmpppprrrreeeessssssss or ccccllllCCCCoooommmmpppprrrreeeessssssss should either be made by a separate thread within the program or with CL_CONTINUOUS_NONBLOCK as the frame count parameter since it will not return until the transfer is complete. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS :::: GGGGEEEENNNNEEEERRRRAAAALLLL CCCCLLLL The following general CL parameters are useful for Impactcomp. For more information, see _C_L_i_n_t_r_o(3dm). CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____WWWWIIIIDDDDTTTTHHHH Uncompressed image width, in pixels. When transfering to or from video using NTSC timing, the width must be 640. When transfering to or from video using PAL timing, the width must be 768. When transfering to or from video using CCIR timing, the width must be 720. The width must always be a multiple of 16. CCCCLLLL____IIIIMMMMAAAAGGGGEEEE____HHHHEEEEIIIIGGGGHHHHTTTT Uncompressed image height in pixels. Since Impactcomp deals in fields which represent every other line of a video frame, the image height is half of the full frame height. The height must always be a multiple of 8. The video port on Impactcomp transmits 243 lines per field in NTSC mode which is not a multiple of 8. Applications should therefore either specify 240 or 248 as the height for NTSC or CCIR(525). The height for PAL or CCIR(625) should be 288. CCCCLLLL____IIIINNNNTTTTEEEERRRRNNNNAAAALLLL____IIIIMMMMAAAAGGGGEEEE____WWWWIIIIDDDDTTTTHHHH Width of compressed image. This is normally the same as CL_IMAGE_WIDTH, but may be different when scaling is used. Impactcomp has two types of image scaling capability. When decompressing from memory to memory, the image may be downsized from the original. This mode of scaling is enabled by setting CL_IMAGE_WIDTH to the desired reduced size while setting CL_INTERNAL_IMAGE_WIDTH to the original size contained in the JPEG data. When compressing or decompressing from external video, Impactcomp supports a limited form of scaling. If the CL_IMAGE_WIDTH is set to the width of the video field (either 640, 704 or 768), and CL_INTERNAL_IMAGE_WIDTH is set to one half of that (either 320, 352 or 384), then Impactcomp will scale the image by a factor of two. It is only necessary to set this parameter if one of these two types of scaling is desired. CCCCLLLL____IIIINNNNTTTTEEEERRRRNNNNAAAALLLL____IIIIMMMMAAAAGGGGEEEE____HHHHEEEEIIIIGGGGHHHHTTTT Height of compressed image. This is normally the same as CL_IMAGE_HEIGHT, but may be different when scaling is used. See the discussion of CL_INTERNAL_IMAGE_WIDTH above. CCCCLLLL____FFFFOOOORRRRMMMMAAAATTTT When decompressing or compressing to or from memory, Impactcomp recognizes 32-bit RGB pixels (CL_FORMAT_XBGR), or 16-bit YCbCr PPPPaaaaggggeeee 2222 ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) pixels (CL_FORMAT_YCbCr422). CCCCLLLL____AAAALLLLGGGGOOOORRRRIIIITTTTHHHHMMMM____IIIIDDDD _I_M_P_A_C_T _C_o_m_p_r_e_s_s_i_o_n does not have a fixed algorithm identifier. Applications must use ccccllllQQQQuuuueeeerrrryyyySSSScccchhhheeeemmmmeeeeFFFFrrrroooommmmNNNNaaaammmmeeee to determine the appropriate scheme on each machine. CCCCLLLL____OOOORRRRIIIIEEEENNNNTTTTAAAATTTTIIIIOOOONNNN IMPACT Compression is capable of handling both ``top down'' and ``bottom up'' image formats for uncompressed data only. Compressed data is in all cases ``top down''. CCCCLLLL____EEEENNNNAAAABBBBLLLLEEEE____IIIIMMMMAAAAGGGGEEEEIIIINNNNFFFFOOOO Setting this parameter to ``TRUE'' enables the ccccllllGGGGeeeettttNNNNeeeexxxxttttIIIImmmmaaaaggggeeeeIIIInnnnffffoooo(3dm) CL function which can be used to retrieve time stamp and other information about compressed fields. In the case of Impactcomp compressing from external video, the time stamp returned represents the time at which the first line of the uncompressed field arrived at the Impactcomp board. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS :::: JJJJPPPPEEEEGGGG The following JPEG parameters may also be used. See _c_l__j_p_e_g(3dm) for descriptions. CCCCLLLL____JJJJPPPPEEEEGGGG____QQQQUUUUAAAALLLLIIIITTTTYYYY____FFFFAAAACCCCTTTTOOOORRRR CCCCLLLL____JJJJPPPPEEEEGGGG____QQQQUUUUAAAANNNNTTTTIIIIZZZZAAAATTTTIIIIOOOONNNN____TTTTAAAABBBBLLLLEEEESSSS CCCCLLLL____JJJJPPPPEEEEGGGG____SSSSTTTTRRRREEEEAAAAMMMM____HHHHEEEEAAAADDDDEEEERRRRSSSS PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS :::: IIIIMMMMPPPPAAAACCCCTTTTCCCCOOOOMMMMPPPP These parameters are specific to IMPACT Compression. CCCCLLLL____IIIIMMMMPPPPAAAACCCCTTTT____VVVVIIIIDDDDEEEEOOOO____IIIINNNNPPPPUUUUTTTT____CCCCOOOONNNNTTTTRRRROOOOLLLL Type: CL_ENUM_VALUE Gets and sets the codec channel in use by this handle. The value of this parameter is a cookie to be provided to the Video Library (VL) when CL_EXTERNAL_DEVICE is used. CCCCLLLL____IIIIMMMMPPPPAAAACCCCTTTT____VVVVIIIIDDDDEEEEOOOO____IIIINNNNPPPPUUUUTTTT____CCCCOOOONNNNTTTTRRRROOOOLLLL Type: CL_ENUM_VALUE Controls operation of the codec. If this parameter is set to CL_IMPACT_STOP prior to a call to clCompress/clDecompress, processing will pause until set to the value CL_IMPACT_START. After clCompress/clDecompress has been called, when this parameter is set to CL_IMPACT_STOP, the codec will stop processing. CCCCLLLL____IIIIMMMMPPPPAAAACCCCTTTT____FFFFRRRRAAAAMMMMEEEE____IIIINNNNTTTTEEEERRRRLLLLEEEEAAAAVVVVEEEE Type: CL_RANGE_VALUE In memory-to-memory operations, it is possible to access the uncompressed PPPPaaaaggggeeee 3333 ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) ccccllll____iiiimmmmppppaaaaccccttttccccoooommmmpppp((((3333ddddmmmm)))) images as interleaved frames, which are de-interleaved during compression or interleaved during decompression. These operations are performed when this parameter has the value TRUE. CCCCLLLL____IIIIMMMMPPPPAAAACCCCTTTT____IIIINNNNTTTTEEEERRRRLLLLEEEEAAAAVVVVEEEE____MMMMOOOODDDDEEEE Type: CL_ENUM_VALUE When using CL_IMPACT_FRAME_INTERLEAVE, this parameter specifies which of the decompressed images is the top-most line. If the first (and all subsequent odd numbered fields) occupies the top line of the uncompressed image, use CL_IMPACT_INTERLEAVE_ODD. Use CL_IMPACT_INTERLEAVE_EVEN for the case where even numbered fields occupy the top-most line of the uncompressed image. CCCCOOOONNNNNNNNEEEECCCCTTTTIIIINNNNGGGG TTTTOOOO VVVVIIIIDDDDEEEEOOOO The IMPACT Compression option has built-in analog video I/O, and, if installed, a direct connection to IMPACT Video. Applications need to talk with both the Compression LIbrary and the Video Library (VL) to perform video I/O. An application needs to query the CL parameter CL_IMPACT_VIDEO_INPUT_CONTROL, and in turn, pass the returned value to the vlGetNode() routine as the VL_CODEC node to open. See _i_m_p_a_c_t_v_i_d_e_o(7), _i_m_p_a_c_t_c_o_m_p(7), and _v_l(3dm) for more information, and the example applications in /usr/people/4Dgifts/examples/dmedia/compression/impact FFFFIIIILLLLEEEESSSS /usr/include/dmedia/cl.h /usr/include/dmedia/cl_impactcomp.h SSSSEEEEEEEE AAAALLLLSSSSOOOO jpeg(4), CLintro(3dm), cl_jpeg(3dm), vl(3dm), impactvideo(7), impactcomp(7) PPPPaaaaggggeeee 4444